<?php
/**
 * @link http://cn2.php.net/manual/en/migration54.incompatible.php
 * @version $Id: 10_param_shadow_sg_disallow.php 211 2012-03-02 10:56:14Z horseluke@126.com $
 */

/*
10. Parameter names that shadow super globals now cause a fatal error. 
This prohibits code like function foo($_GET, $_POST) {}.

PHP 5.3:
Warning: Missing argument 1 for parse_get(), called in D:\htdoc_custom\php_5_4\1
0_param_shadow_sg_disallow.php on line 31 and defined in D:\htdoc_custom\php_5_4
\10_param_shadow_sg_disallow.php on line 34
array(2) {
  ["res"]=>
  string(2) "OK"
  ["arr"]=>
  array(1) {
    ["test"]=>
    int(1)
  }
}

PHP 5.4:
Fatal error: Cannot re-assign auto-global variable _FILES in D:\htdoc_custom\php
_5_4\10_param_shadow_sg_disallow.php on line 36

*/
error_reporting(E_ALL);

$_GET = array('test'=>1);
$get = parse_get();
var_dump($get);

function parse_get($_GET){
	return array('res'=>'OK', 'arr'=>$_GET);
}


/*
$data = parse_files();
var_dump($data);
function parse_files($_FILES){
	return array('res'=>'OK', 'arr'=>$_FILES);
}
*/